import { defineConfig } from 'umi';

export default defineConfig({
  title: '美的可视化大屏',
  nodeModulesTransform: {
    type: 'none',
  },
  routes: [
    { path: '/', component: '@/pages/index' },
    // {
    //   path: '/',
    //   redirect: '/metrics/graph',
    // },
    // {
    //   path: '/metrics',
    //   redirect: '/metrics/graph',
    //   icon: 'dashboard',
    //   name: 'metrics.title',
    // },
    // {
    //   path: '/metrics/graph',
    //   component: '@/pages/index',
    //   name: 'metrics.graph.title',
    //   layout: false,
    // },
  ],
  fastRefresh: {},
  //配置代理
  proxy: {
    '/api': {
      target: 'http://localhost:5011',
      changeOrigin: true,
      pathRewrite: { '^/api': '/api' },
    },
  },
  base: '/mideabigscreen/', // 路由基础路径
  publicPath: '/mideabigscreen/',
  outputPath: 'mideabigscreen',
});
